#ifndef INFRARED_H
#define INFRARED_H

#include "delay.h"

/**
 * @brief Initialize infrared sensor (configure PA3 as analog input)
 */
void infrared_init(void);

/**
 * @brief Get infrared sensor detection result (after filtering)
 * @return 1-detected object, 0-no object detected
 */
uint16_t infrared_get_data(void);

/**
 * @brief Read raw AD value from infrared sensor (unfiltered)
 * @return Raw AD sampling value (0-4095, depending on ADC bits)
 */
uint16_t infrared_read_raw(void);

#endif // __INFRARED_H__
